mmc: correctly check ret in mmc_fill_device_info
authorYann Gautier <[email protected]>
Thu, 17 Jan 2019 10:17:05 +0000 (11:17 +0100)
committerYann Gautier <[email protected]>
Thu, 17 Jan 2019 10:17:05 +0000 (11:17 +0100)
In patch 93768644, ret will be MMC_STATE_TRAN (=4), which is a valid value.
We shouldn't exit the function in that case, but only if ret is < 0.

Change-Id: I776693fe847b6b45190af028f12d2e724ca46399
Signed-off-by: Yann Gautier <[email protected]>
drivers/mmc/mmc.c

index 450bd0b5da3aaed0d6e985b7b18232c3a1ab6a91..77d683c459d4660180f314bbfaf879a4d2aefeb6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -300,7 +300,7 @@ static int mmc_fill_device_info(void)
                break;
        }
 
-       if (ret != 0) {
+       if (ret < 0) {
                return ret;
        }